1. Field of the Invention
The present invention relates generally to electronic compasses for use in vehicles, and more particularly, relates to a method of automatic continuous calibration of an electronic compass for use in a vehicle.
2. Description of Related Art
Magnetic compasses are commonly used in vehicles, including land vehicles, boats, air craft and even by hikers, as an aide in direction finding and navigation. The popularity has increased for use of the electronic compasses in motor vehicles, in either the rearview mirror or on a separate overhead console unit. Meanwhile, the manufacturers of the vehicles are increasingly asking for more accurate and low cost compass products for their vehicles.
Generally speaking, vehicles use one of two compass products. The first is a two board system where a remote sensor board communicates through a display via a wiring harness. The second type is a single board system consisting of a sensor board which transmits the heading information digitally in various formats to a remote location via a wiring harness. Typically the sensor board contains a micro controller, a dual axis magnetic or magnetoresistive sensor and associated signal conditioning circuitry. Other types of sensors such as a flux gate sensor may also be utilized to sense the magnetic field, strength and direction of such field. The magnetoresistive sensor generally measures the earths magnetic field. The signal conditioning circuit then amplifies the voltage output of the magneto resistive sensor to a level optimum for the micro controllers"" analog to digital converter. Once the readings are processed by the software the heading is determined and then transmitted via the wiring harness to the display board where they are processed by the software to determine the current heading.
Typically, electronic compasses operate by detecting the earth""s magnetic field. However, they have an inherent problem that magnetic disturbances in the environment will affect the electronic compass readings and headings. Furthermore, any nearby electronic devices and ferrous objects will also affect the compass readings. Therefore, to accurately determine the heading, the compass must be able to compensate for these magnetic distortions which are found in every day use. Prior art devices have tried to compensate for the deviation of ferrous objects and magnetic distortions and/or disturbance but the accuracy is still not sufficient.
Therefore, there is a need in the art for an electronic compass that uses a calibration routine that is low in cost and provides a more accurate, stable and dependable updated compass heading, capable of compensating for ferrous objects and magnetic disturbances found in everyday use. Furthermore, due to the dynamic nature of the compass""s magnetic environment there is a need for a compass calibration routine which does not depend on an extended history of past magnetic sensor data to determine its current movement. Also, there is a need for an adaptable compass calibration routine that can vary its rate of calibration according to the current magnetic environment thereby yielding more accuracy and dependability in a shorter period of operation.
One object of the present invention is to provide a novel continuous calibration routine for an electronic compass.
Another object of the present invention is to provide a continuous calibration routine that will continuously compensate for magnetic disturbances associated with electronic compasses.
Yet a further object of the present invention is to provide an electronic compass that is capable of increasing or decreasing the amount of filtered response used in the heading.
A further object of the present invention is to provide an electronic compass that includes two different sets of minimum and maximum values to ensure that the most accurate heading is achieved for the sensor readings and also weighted according to how many sensor readings have been taken.
A further object of the present invention is to provide an electronic compass that does not use an extended history of past sensor data to determine the compasses current movement, therefore allowing the compass to recalibrate more quickly and efficiently when operating in a dynamic magnetic environment.
A further object of the present invention is to provide a calibration method that is capable of varying the rate at which the calibration is updated in order to respond more quickly and accurately to changes in the local magnetic environment.
Still a further object of the present invention is to provide a calibration method that is highly adaptable through the adjustment of key parameters thereby allowing for accurate heading determination in various operating environments.
To achieve the foregoing objects an automatic continuous calibration method for use with an electronic compass is provided. The method includes initializing variables, and then retrieving sensor readings from at least two axis. The method further includes comparing compass tilt to a predetermined threshold. Then the method determines if the span of the sensor readings are greater than a predetermined minimum spread. Next the method obtains minimum and maximum sensor readings for the current calibration cycle. Next the method will update the current calibration based upon the minimum and maximum readings obtained during the current calibration cycle. The method will then calculate an offset and scaling value for each axis and will adjust the sensor readings by these values to obtain compensated sensor values for each axis. Then the method will calculate an azimuth value with the adjusted sensor values and finally determine the heading using the azimuth value.
One advantage of the present invention is that the method of continuous calibration will more accurately compensate for local changes in the magnetic disturbances associated with electronic compasses.
A further advantage of the present invention is that the calibration routine or method uses two separate sets of minimum and maximum values to determine if the compass has gone in a full circle and in determining the heading of the compass.
A further advantage of the present invention is that the method does not use an extended history of sensor data to determine the compasses current movement. Therefore, the compass is able to recalibrate itself more quickly, efficiently and rapidly, when operating in a dynamic magnetic environment that changes due to variations in stray/ambient magnetic fields and changes in the ferrous material near the compass, such as found in a vehicle.
A further advantage of the present invention is that the calibration method is capable of varying the rate at which the calibration is updated in order to respond more quickly and accurately to changes in the local magnetic environment.
A further advantage of the present invention is that by the adjustment of certain parameters the algorithm is highly adaptive to allow for accurate heading determination in various operating environments.
Other objects, features and advantages of the present invention will become apparent from the subsequent description and appended claims, taken in conjunction with the accompanying drawings.